CC       = gcc
CFLAGS   = -Wall -ggdb
LDFLAGS  = -mwindows
LIBS     = 
TARGET   = kk-patch.exe
INCLUDES = -I.
SOURCES  = $(wildcard *.c)
OBJS     = $(patsubst %.c,%.o,$(SOURCES))
		
all: $(TARGET)

$(TARGET) : $(OBJS)	
	$(CC) $(OBJS) -o $(TARGET) $(LDFLAGS) $(LIBS)	
	del $(OBJS)
																				
%.o: %.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
	
clean:	
	del $(OBJS) 
	del	$(TARGET)			

c: clean

r: clean all
